home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / AllPlaton / Unsorted / Jumping Point.AMOS / Jumping Point.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1992-09-07  |  1.6 KB  |  62 lines

  1. Screen Open 0,640,800,8,Lowres
  2. Screen Display 0,,,320,200
  3. Flash Off : Paper 0 : Curs Off : Cls 0
  4. Hide On 
  5. ANZ=10 : L=1
  6. BACK:
  7. Add ANZ,10
  8. Flash 17,"(FFF,3)(CCC,3)(999,3)(666,3)(333,3)(666,3)(999,3)(ccc,3)"
  9. Cls 
  10. Screen Offset 0,0,0
  11. S=1 : H=10 : X=159 : Y=0
  12. For A=0 To ANZ
  13.   Ink Rnd(6)+1
  14.   X1=Rnd(639) : X2=Rnd(639) : If X1>X2 Then Swap X1,X2
  15.   Y1=Rnd(798) : Y2=Rnd(798) : If Y1>Y2 Then Swap Y1,Y2
  16.   Draw X1,Y1 To X2,Y2
  17. Next 
  18. Fade 2,0,$888,$F0,$F00,$FF0,$FF,$F0F,$F
  19. SX=0
  20. Do 
  21.   XA=X : YA=Y : Add Y,S : G=0 : PA=0
  22.   For A=-1 To S/4+1
  23.     P=Point(X,Y/4+A)
  24.     If P>0 and Y/4+A>0 Then Y=Y+A*4-1 : S=-S : PA=P : G=1 : Exit 
  25.   Next 
  26.   If Y<0 Then S=-S
  27.   If PA=2 and H<4 Then H=4
  28.   If PA=3 Then Inc S : H=10
  29.   If PA=4 Then Dec S : H=10
  30.   If PA=5 Then Dec S : H=10 : If S>-12 Then Dec S
  31.   If PA=6 Then Add SX,-1 : If H<9 Then H=9
  32.   If PA=7 Then Add SX,1 : If H<9 Then H=9
  33.   If YA<>Y and G=1 Then Volume Min(Abs(S*3),63) : Shoot 
  34.   Inc S : If Jup(1) and H<10 Then Inc H : Dec S : Dec S
  35.   If G=1 and S>0 Then S=0 : H=0
  36.   SX=Max(Min(SX-Jright(1)+Jleft(1),5),-5)
  37.   Add X,SX,0 To 639
  38.   O=Min(Max(Y/4-100,0),600)
  39.   OX=Min(Max(X-160,0),320)
  40.   Wait Vbl : Screen Offset 0,OX,O : Sprite 1,X+112-OX,Y/4+42-O,1
  41.   If Y/4>799 Then Exit 
  42. Loop 
  43. Volume 63
  44. Boom 
  45. Inc L
  46. Sprite Off 
  47. Locate 0,50 : Centre "Well Done!"
  48. Locate 0,54 : Centre "Now Try Level"+Str$(L)
  49. X=160 : S=0 : Y=400
  50. Repeat 
  51.   If OX<X Then Inc S
  52.   If Int(OX/16)=Int(X/16) and S<>0 Then S=S-(Abs(S)/S)
  53.   If OX>X Then Dec S
  54.   If O<Y Then Inc SY
  55.   If Int(O/24)=Int(Y/24) and SY<>0 Then SY=SY-(Abs(SY)/SY)
  56.   If O>Y Then Dec SY
  57.   Add OX,S : Add O,SY : Wait Vbl : Screen Offset 0,OX,O
  58. Until X=OX and SY=0
  59. Wait 50
  60. Fade 2
  61. Wait 40
  62. Goto BACK